<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>benny-sdl-classes: Box Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">benny-sdl-classes
   
   </div>
   <div id="projectbrief">Benny&#39;s assorted SDL game classes. Does exactly what it says on the can.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('class_box.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Box Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Box" -->
<p><code>#include &lt;<a class="el" href="_box_8h_source.html">Box.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Box:</div>
<div class="dyncontent">
<div class="center"><img src="class_box__inherit__graph.png" border="0" usemap="#_box_inherit__map" alt="Inheritance graph"/></div>
<map name="_box_inherit__map" id="_box_inherit__map">
<area shape="rect" id="node3" href="class_particle.html" title="Particle" alt="" coords="5,80,72,107"/><area shape="rect" id="node5" href="class_player_simple.html" title="PlayerSimple" alt="" coords="96,80,195,107"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="class_box-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#aca78d7db44972bfa78d46b7bbc8796f6">Box</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#aca78d7db44972bfa78d46b7bbc8796f6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a6a5e09398e85d602a046b429062fb9c2">~Box</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a6a5e09398e85d602a046b429062fb9c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab">draw_object</a> (SDL_Surface *screen, SDL_Rect camera)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw the <a class="el" href="class_box.html">Box</a>.  <a href="#a262047af0b6fb0bc3b21d8d26bf74eab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#aef168d8226c16322d2778fdf756057bb">tick</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty tick funtion.  <a href="#aef168d8226c16322d2778fdf756057bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a71b5039df641d69575cecbcee432147b">collides</a> (const <a class="el" href="class_box.html">Box</a> *collider) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Rectangular collision detection with other <a class="el" href="class_box.html">Box</a> objects/derivatives.  <a href="#a71b5039df641d69575cecbcee432147b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a867874e870f47f22a39dc97fc523a0a9">collides</a> (const SDL_Rect *collider) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Rectangular collision detection with SDL_Rects and derivatives.  <a href="#a867874e870f47f22a39dc97fc523a0a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Sint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#aa4a468fd608291595385d037b201614d">get_x</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the x position of the <a class="el" href="class_box.html">Box</a>.  <a href="#aa4a468fd608291595385d037b201614d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Sint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#abe0987545b605259cb1d7b3a463ec6e1">get_y</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the y position of the <a class="el" href="class_box.html">Box</a>.  <a href="#abe0987545b605259cb1d7b3a463ec6e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Sint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536">get_x1</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the minimum x position of the <a class="el" href="class_box.html">Box</a>.  <a href="#a4e16accb8a43c6ab00066372ffec0536"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Sint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe">get_y1</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the minimum y position of the <a class="el" href="class_box.html">Box</a>.  <a href="#a41a1bfbf7a88039f2a1eefd181ff56fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Sint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815">get_x2</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the maximum x position of the <a class="el" href="class_box.html">Box</a>.  <a href="#a376ed2bc4b6c2bbbb1a0e40ad7c26815"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Sint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc">get_y2</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the maximum y position of the <a class="el" href="class_box.html">Box</a>.  <a href="#a32b2d05f1da7f8e5f33767ce7f4f8bfc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#aa88ca140376a67872f2f7c1a1c39eb6b">set_x</a> (Sint16 x)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the x position of the <a class="el" href="class_box.html">Box</a>.  <a href="#aa88ca140376a67872f2f7c1a1c39eb6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a99ffef8e5f7a78611f5650f005594da0">set_y</a> (Sint16 y)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the y position of the <a class="el" href="class_box.html">Box</a>.  <a href="#a99ffef8e5f7a78611f5650f005594da0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a6702cb074e92ec70bc029fb2ff6d62f7">set_pos</a> (Sint16 x, Sint16 y)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the x and y positions of the <a class="el" href="class_box.html">Box</a>.  <a href="#a6702cb074e92ec70bc029fb2ff6d62f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a9c17a4d538d2ff7ab67f516d607fc3dd">set_w</a> (Uint16 w)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the width of the <a class="el" href="class_box.html">Box</a>.  <a href="#a9c17a4d538d2ff7ab67f516d607fc3dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#af7a137e6afa3dde822017522ac635494">set_h</a> (Uint16 h)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the height of the <a class="el" href="class_box.html">Box</a>.  <a href="#af7a137e6afa3dde822017522ac635494"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a1f3e245dad98042900c0348103c00a71">set_dimensions</a> (Uint16 w, Uint16 h)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the width and height of the <a class="el" href="class_box.html">Box</a>.  <a href="#a1f3e245dad98042900c0348103c00a71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Rect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#ae6616cb4d7d2826e8035aaa6651224a9">get_dimensions</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Rect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a0a610d3f5ac9bcd251fe98636faea417">get_position</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#ab9c5f9eacf32e399b48c932f58704339">load_sprite</a> (const char *path)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads a sprite and sets it to be used.  <a href="#ab9c5f9eacf32e399b48c932f58704339"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a37ffc759ea75c89c6fe2ac3d1d897a2e">set_sprite</a> (SDL_Surface *newSprite)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a sprite to be used.  <a href="#a37ffc759ea75c89c6fe2ac3d1d897a2e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a5d807c5d4f1cace5416b30be4c3c97f2">set_mode</a> (int mode, bool val)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a mode of the <a class="el" href="class_box.html">Box</a>.  <a href="#a5d807c5d4f1cace5416b30be4c3c97f2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a93f300a67e2c7532497987c4ee68d829">get_mode</a> (int mode) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the state of a mode of the <a class="el" href="class_box.html">Box</a>.  <a href="#a93f300a67e2c7532497987c4ee68d829"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a66791c172ec7b6f865448f7935eb4ae4">set_colour</a> (int r, int g, int b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set box colour.  <a href="#a66791c172ec7b6f865448f7935eb4ae4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a1402836a6cf3bb006cab54d6411aa1a2">set_colour</a> (SDL_Colour colour)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set box colour.  <a href="#a1402836a6cf3bb006cab54d6411aa1a2"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Colour&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a75ec7af4bf4a011c3636c05e98abb154">boxColour</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Rect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a2ea13ce4c2a4d9045bdd07b70a2d3b4e">boxRect</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Rect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#ae8a7fb4f1f59a7e8b2baaa66811b1a15">clipRect</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_box.html#a3adda3311d61e9a36e6c2ff412e03a82">sprite</a></td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aca78d7db44972bfa78d46b7bbc8796f6"></a><!-- doxytag: member="Box::Box" ref="aca78d7db44972bfa78d46b7bbc8796f6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Box::Box </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>
<p>Default constructor that will create a box with default values. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#a6a5e09398e85d602a046b429062fb9c2" title="Destructor.">~Box()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6a5e09398e85d602a046b429062fb9c2"></a><!-- doxytag: member="Box::~Box" ref="a6a5e09398e85d602a046b429062fb9c2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Box::~Box </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<p>Checks the modes to see if the sprite should be freed. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#aca78d7db44972bfa78d46b7bbc8796f6" title="Default constructor.">Box()</a>,<a class="el" href="class_box.html#a5d807c5d4f1cace5416b30be4c3c97f2" title="Sets a mode of the Box.">set_mode()</a>,<a class="el" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box.">get_mode()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a6a5e09398e85d602a046b429062fb9c2_cgraph.png" border="0" usemap="#class_box_a6a5e09398e85d602a046b429062fb9c2_cgraph" alt=""/></div>
<map name="class_box_a6a5e09398e85d602a046b429062fb9c2_cgraph" id="class_box_a6a5e09398e85d602a046b429062fb9c2_cgraph">
<area shape="rect" id="node3" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="139,5,250,32"/></map>
</div>
</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a71b5039df641d69575cecbcee432147b"></a><!-- doxytag: member="Box::collides" ref="a71b5039df641d69575cecbcee432147b" args="(const Box *collider) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Box::collides </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_box.html">Box</a> *&#160;</td>
          <td class="paramname"><em>collider</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rectangular collision detection with other <a class="el" href="class_box.html">Box</a> objects/derivatives. </p>
<p>Returns true if the <a class="el" href="class_box.html">Box</a> collides with (overlaps) the collider </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">collider</td><td>a pointer to a <a class="el" href="class_box.html">Box</a> or derived class that will be tested for collision with this <a class="el" href="class_box.html">Box</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd>collides(const SDL_Rect* collider) </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a71b5039df641d69575cecbcee432147b_cgraph.png" border="0" usemap="#class_box_a71b5039df641d69575cecbcee432147b_cgraph" alt=""/></div>
<map name="class_box_a71b5039df641d69575cecbcee432147b_cgraph" id="class_box_a71b5039df641d69575cecbcee432147b_cgraph">
<area shape="rect" id="node3" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box." alt="" coords="153,5,245,32"/><area shape="rect" id="node7" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box." alt="" coords="153,56,245,83"/><area shape="rect" id="node10" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box." alt="" coords="153,107,245,133"/><area shape="rect" id="node13" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box." alt="" coords="153,157,245,184"/><area shape="rect" id="node5" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="294,81,405,108"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a71b5039df641d69575cecbcee432147b_icgraph.png" border="0" usemap="#class_box_a71b5039df641d69575cecbcee432147b_icgraph" alt=""/></div>
<map name="class_box_a71b5039df641d69575cecbcee432147b_icgraph" id="class_box_a71b5039df641d69575cecbcee432147b_icgraph">
<area shape="rect" id="node3" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab" title="Draw the Box." alt="" coords="152,5,275,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a867874e870f47f22a39dc97fc523a0a9"></a><!-- doxytag: member="Box::collides" ref="a867874e870f47f22a39dc97fc523a0a9" args="(const SDL_Rect *collider) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Box::collides </td>
          <td>(</td>
          <td class="paramtype">const SDL_Rect *&#160;</td>
          <td class="paramname"><em>collider</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rectangular collision detection with SDL_Rects and derivatives. </p>
<p>Returns true if the <a class="el" href="class_box.html">Box</a> collides with (overlaps) the collider </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">collider</td><td>a pointer to an SDL_Rect or derived class that will be tested for collision with this <a class="el" href="class_box.html">Box</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd>collides(const Box* collider) </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a867874e870f47f22a39dc97fc523a0a9_cgraph.png" border="0" usemap="#class_box_a867874e870f47f22a39dc97fc523a0a9_cgraph" alt=""/></div>
<map name="class_box_a867874e870f47f22a39dc97fc523a0a9_cgraph" id="class_box_a867874e870f47f22a39dc97fc523a0a9_cgraph">
<area shape="rect" id="node3" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box." alt="" coords="153,5,245,32"/><area shape="rect" id="node7" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box." alt="" coords="153,56,245,83"/><area shape="rect" id="node10" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box." alt="" coords="153,107,245,133"/><area shape="rect" id="node13" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box." alt="" coords="153,157,245,184"/><area shape="rect" id="node5" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="294,81,405,108"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a262047af0b6fb0bc3b21d8d26bf74eab"></a><!-- doxytag: member="Box::draw_object" ref="a262047af0b6fb0bc3b21d8d26bf74eab" args="(SDL_Surface *screen, SDL_Rect camera)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::draw_object </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>screen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Rect&#160;</td>
          <td class="paramname"><em>camera</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draw the <a class="el" href="class_box.html">Box</a>. </p>
<p>Draws the box onto the passed screen with offsetting for 2D camera movement. If a sprite exists, will draw that according to boxRect's x and y elements with clipRect as a clipping mask. If no sprite, will fill the rectangle boxRect with boxColour. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">screen</td><td>an SDL_Surface to draw onto (usually the screen, but could be any surface) </td></tr>
    <tr><td class="paramname">camera</td><td>an SDL_Rect that represents the camera view where the x and y elements are the camera's position in the 2D world. w and h currently unused (possibly for zoom/scaling in the future) </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#a5d807c5d4f1cace5416b30be4c3c97f2" title="Sets a mode of the Box.">set_mode()</a>,<a class="el" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box.">get_mode()</a>, <a class="el" href="class_box.html#a2ea13ce4c2a4d9045bdd07b70a2d3b4e">boxRect</a>, <a class="el" href="class_box.html#ae8a7fb4f1f59a7e8b2baaa66811b1a15">clipRect</a>, <a class="el" href="class_box.html#a3adda3311d61e9a36e6c2ff412e03a82">sprite</a>, <a class="el" href="class_box.html#aa88ca140376a67872f2f7c1a1c39eb6b" title="Sets the x position of the Box.">set_x()</a>, <a class="el" href="class_box.html#a99ffef8e5f7a78611f5650f005594da0" title="Sets the y position of the Box.">set_y()</a>, <a class="el" href="class_box.html#a6702cb074e92ec70bc029fb2ff6d62f7" title="Sets the x and y positions of the Box.">set_pos()</a>, <a class="el" href="class_box.html#a9c17a4d538d2ff7ab67f516d607fc3dd" title="Sets the width of the Box.">set_w()</a>, <a class="el" href="class_box.html#af7a137e6afa3dde822017522ac635494" title="Sets the height of the Box.">set_h()</a>, <a class="el" href="class_box.html#a1f3e245dad98042900c0348103c00a71" title="Sets the width and height of the Box.">set_dimensions()</a>, <a class="el" href="class_box.html#a66791c172ec7b6f865448f7935eb4ae4" title="Set box colour.">set_colour(int r, int g, int b)</a>, <a class="el" href="class_box.html#a1402836a6cf3bb006cab54d6411aa1a2" title="Set box colour.">set_colour(SDL_Colour colour)</a>, <a class="el" href="class_box.html#ab9c5f9eacf32e399b48c932f58704339" title="Loads a sprite and sets it to be used.">load_sprite(const char* path)</a>, <a class="el" href="class_box.html#a37ffc759ea75c89c6fe2ac3d1d897a2e" title="Sets a sprite to be used.">set_sprite</a>(SDL_Surface* newSprite </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a262047af0b6fb0bc3b21d8d26bf74eab_cgraph.png" border="0" usemap="#class_box_a262047af0b6fb0bc3b21d8d26bf74eab_cgraph" alt=""/></div>
<map name="class_box_a262047af0b6fb0bc3b21d8d26bf74eab_cgraph" id="class_box_a262047af0b6fb0bc3b21d8d26bf74eab_cgraph">
<area shape="rect" id="node3" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="465,85,575,112"/><area shape="rect" id="node5" href="class_box.html#a71b5039df641d69575cecbcee432147b" title="Rectangular collision detection with other Box objects/derivatives." alt="" coords="177,85,274,112"/><area shape="rect" id="node7" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box." alt="" coords="323,35,415,61"/><area shape="rect" id="node10" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box." alt="" coords="323,85,415,112"/><area shape="rect" id="node13" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box." alt="" coords="323,136,415,163"/><area shape="rect" id="node16" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box." alt="" coords="323,187,415,213"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae6616cb4d7d2826e8035aaa6651224a9"></a><!-- doxytag: member="Box::get_dimensions" ref="ae6616cb4d7d2826e8035aaa6651224a9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Rect Box::get_dimensions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a93f300a67e2c7532497987c4ee68d829"></a><!-- doxytag: member="Box::get_mode" ref="a93f300a67e2c7532497987c4ee68d829" args="(int mode) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Box::get_mode </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the state of a mode of the <a class="el" href="class_box.html">Box</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>An integer that represents the mode to be get'd </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#a5d807c5d4f1cace5416b30be4c3c97f2" title="Sets a mode of the Box.">set_mode()</a>, <a class="el" href="bennysc_8h.html">bennysc.h</a> </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a93f300a67e2c7532497987c4ee68d829_icgraph.png" border="0" usemap="#class_box_a93f300a67e2c7532497987c4ee68d829_icgraph" alt=""/></div>
<map name="class_box_a93f300a67e2c7532497987c4ee68d829_icgraph" id="class_box_a93f300a67e2c7532497987c4ee68d829_icgraph">
<area shape="rect" id="node3" href="class_box.html#a6a5e09398e85d602a046b429062fb9c2" title="Destructor." alt="" coords="170,5,254,32"/><area shape="rect" id="node5" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab" title="Draw the Box." alt="" coords="453,107,576,133"/><area shape="rect" id="node7" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box." alt="" coords="166,107,258,133"/><area shape="rect" id="node12" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box." alt="" coords="166,157,258,184"/><area shape="rect" id="node15" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box." alt="" coords="166,208,258,235"/><area shape="rect" id="node18" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box." alt="" coords="166,259,258,285"/><area shape="rect" id="node9" href="class_box.html#a71b5039df641d69575cecbcee432147b" title="Rectangular collision detection with other Box objects/derivatives." alt="" coords="307,157,405,184"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a0a610d3f5ac9bcd251fe98636faea417"></a><!-- doxytag: member="Box::get_position" ref="a0a610d3f5ac9bcd251fe98636faea417" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Rect Box::get_position </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aa4a468fd608291595385d037b201614d"></a><!-- doxytag: member="Box::get_x" ref="aa4a468fd608291595385d037b201614d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Sint16 Box::get_x </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the x position of the <a class="el" href="class_box.html">Box</a>. </p>
<p>This is the absolute position, does not account for centered drawing </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#abe0987545b605259cb1d7b3a463ec6e1" title="Gets the y position of the Box.">get_y()</a>, <a class="el" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box.">get_x1()</a>, <a class="el" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box.">get_x2()</a>, <a class="el" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box.">get_y1()</a>, <a class="el" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box.">get_y2()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4e16accb8a43c6ab00066372ffec0536"></a><!-- doxytag: member="Box::get_x1" ref="a4e16accb8a43c6ab00066372ffec0536" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Sint16 Box::get_x1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the minimum x position of the <a class="el" href="class_box.html">Box</a>. </p>
<p>This accounts for centered drawing </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#aa4a468fd608291595385d037b201614d" title="Gets the x position of the Box.">get_x()</a>, <a class="el" href="class_box.html#abe0987545b605259cb1d7b3a463ec6e1" title="Gets the y position of the Box.">get_y()</a>, <a class="el" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box.">get_x2()</a>, <a class="el" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box.">get_y1()</a>, <a class="el" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box.">get_y2()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a4e16accb8a43c6ab00066372ffec0536_cgraph.png" border="0" usemap="#class_box_a4e16accb8a43c6ab00066372ffec0536_cgraph" alt=""/></div>
<map name="class_box_a4e16accb8a43c6ab00066372ffec0536_cgraph" id="class_box_a4e16accb8a43c6ab00066372ffec0536_cgraph">
<area shape="rect" id="node3" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="147,5,258,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a4e16accb8a43c6ab00066372ffec0536_icgraph.png" border="0" usemap="#class_box_a4e16accb8a43c6ab00066372ffec0536_icgraph" alt=""/></div>
<map name="class_box_a4e16accb8a43c6ab00066372ffec0536_icgraph" id="class_box_a4e16accb8a43c6ab00066372ffec0536_icgraph">
<area shape="rect" id="node3" href="class_box.html#a71b5039df641d69575cecbcee432147b" title="Rectangular collision detection with other Box objects/derivatives." alt="" coords="147,5,245,32"/><area shape="rect" id="node5" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab" title="Draw the Box." alt="" coords="293,5,416,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a376ed2bc4b6c2bbbb1a0e40ad7c26815"></a><!-- doxytag: member="Box::get_x2" ref="a376ed2bc4b6c2bbbb1a0e40ad7c26815" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Sint16 Box::get_x2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the maximum x position of the <a class="el" href="class_box.html">Box</a>. </p>
<p>This accounts for centered drawing </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#aa4a468fd608291595385d037b201614d" title="Gets the x position of the Box.">get_x()</a>, <a class="el" href="class_box.html#abe0987545b605259cb1d7b3a463ec6e1" title="Gets the y position of the Box.">get_y()</a>, <a class="el" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box.">get_x1()</a>, <a class="el" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box.">get_y1()</a>, <a class="el" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box.">get_y2()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_cgraph.png" border="0" usemap="#class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_cgraph" alt=""/></div>
<map name="class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_cgraph" id="class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_cgraph">
<area shape="rect" id="node3" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="147,5,258,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_icgraph.png" border="0" usemap="#class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_icgraph" alt=""/></div>
<map name="class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_icgraph" id="class_box_a376ed2bc4b6c2bbbb1a0e40ad7c26815_icgraph">
<area shape="rect" id="node3" href="class_box.html#a71b5039df641d69575cecbcee432147b" title="Rectangular collision detection with other Box objects/derivatives." alt="" coords="147,5,245,32"/><area shape="rect" id="node5" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab" title="Draw the Box." alt="" coords="293,5,416,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="abe0987545b605259cb1d7b3a463ec6e1"></a><!-- doxytag: member="Box::get_y" ref="abe0987545b605259cb1d7b3a463ec6e1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Sint16 Box::get_y </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the y position of the <a class="el" href="class_box.html">Box</a>. </p>
<p>This is the absolute position, does not account for centered drawing </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#aa4a468fd608291595385d037b201614d" title="Gets the x position of the Box.">get_x()</a>, <a class="el" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box.">get_x1()</a>, <a class="el" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box.">get_x2()</a>, <a class="el" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box.">get_y1()</a>, <a class="el" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box.">get_y2()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a41a1bfbf7a88039f2a1eefd181ff56fe"></a><!-- doxytag: member="Box::get_y1" ref="a41a1bfbf7a88039f2a1eefd181ff56fe" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Sint16 Box::get_y1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the minimum y position of the <a class="el" href="class_box.html">Box</a>. </p>
<p>This accounts for centered drawing </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#aa4a468fd608291595385d037b201614d" title="Gets the x position of the Box.">get_x()</a>, <a class="el" href="class_box.html#abe0987545b605259cb1d7b3a463ec6e1" title="Gets the y position of the Box.">get_y()</a>, <a class="el" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box.">get_x1()</a>, <a class="el" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box.">get_x2()</a>, <a class="el" href="class_box.html#a32b2d05f1da7f8e5f33767ce7f4f8bfc" title="Gets the maximum y position of the Box.">get_y2()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_cgraph.png" border="0" usemap="#class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_cgraph" alt=""/></div>
<map name="class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_cgraph" id="class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_cgraph">
<area shape="rect" id="node3" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="147,5,258,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_icgraph.png" border="0" usemap="#class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_icgraph" alt=""/></div>
<map name="class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_icgraph" id="class_box_a41a1bfbf7a88039f2a1eefd181ff56fe_icgraph">
<area shape="rect" id="node3" href="class_box.html#a71b5039df641d69575cecbcee432147b" title="Rectangular collision detection with other Box objects/derivatives." alt="" coords="147,5,245,32"/><area shape="rect" id="node5" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab" title="Draw the Box." alt="" coords="293,5,416,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a32b2d05f1da7f8e5f33767ce7f4f8bfc"></a><!-- doxytag: member="Box::get_y2" ref="a32b2d05f1da7f8e5f33767ce7f4f8bfc" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Sint16 Box::get_y2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the maximum y position of the <a class="el" href="class_box.html">Box</a>. </p>
<p>This accounts for centered drawing </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#aa4a468fd608291595385d037b201614d" title="Gets the x position of the Box.">get_x()</a>, <a class="el" href="class_box.html#abe0987545b605259cb1d7b3a463ec6e1" title="Gets the y position of the Box.">get_y()</a>, <a class="el" href="class_box.html#a4e16accb8a43c6ab00066372ffec0536" title="Gets the minimum x position of the Box.">get_x1()</a>, <a class="el" href="class_box.html#a376ed2bc4b6c2bbbb1a0e40ad7c26815" title="Gets the maximum x position of the Box.">get_x2()</a>, <a class="el" href="class_box.html#a41a1bfbf7a88039f2a1eefd181ff56fe" title="Gets the minimum y position of the Box.">get_y1()</a> </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_cgraph.png" border="0" usemap="#class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_cgraph" alt=""/></div>
<map name="class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_cgraph" id="class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_cgraph">
<area shape="rect" id="node3" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box." alt="" coords="147,5,258,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_icgraph.png" border="0" usemap="#class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_icgraph" alt=""/></div>
<map name="class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_icgraph" id="class_box_a32b2d05f1da7f8e5f33767ce7f4f8bfc_icgraph">
<area shape="rect" id="node3" href="class_box.html#a71b5039df641d69575cecbcee432147b" title="Rectangular collision detection with other Box objects/derivatives." alt="" coords="147,5,245,32"/><area shape="rect" id="node5" href="class_box.html#a262047af0b6fb0bc3b21d8d26bf74eab" title="Draw the Box." alt="" coords="293,5,416,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ab9c5f9eacf32e399b48c932f58704339"></a><!-- doxytag: member="Box::load_sprite" ref="ab9c5f9eacf32e399b48c932f58704339" args="(const char *path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Box::load_sprite </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Loads a sprite and sets it to be used. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>a C string that is a filename to load </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a66791c172ec7b6f865448f7935eb4ae4"></a><!-- doxytag: member="Box::set_colour" ref="a66791c172ec7b6f865448f7935eb4ae4" args="(int r, int g, int b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_colour </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set box colour. </p>
<p>Sets the box's colour for non-sprite mode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>amount of red colour </td></tr>
    <tr><td class="paramname">g</td><td>amount of green colour </td></tr>
    <tr><td class="paramname">b</td><td>amount of blue colour </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#a1402836a6cf3bb006cab54d6411aa1a2" title="Set box colour.">set_colour(SDL_Colour colour)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1402836a6cf3bb006cab54d6411aa1a2"></a><!-- doxytag: member="Box::set_colour" ref="a1402836a6cf3bb006cab54d6411aa1a2" args="(SDL_Colour colour)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_colour </td>
          <td>(</td>
          <td class="paramtype">SDL_Colour&#160;</td>
          <td class="paramname"><em>colour</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set box colour. </p>
<p>Sets the box's colour for non-sprite mode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">colour</td><td>Colour as an SDL_Colour </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#a66791c172ec7b6f865448f7935eb4ae4" title="Set box colour.">set_colour(int r, int b, int g)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1f3e245dad98042900c0348103c00a71"></a><!-- doxytag: member="Box::set_dimensions" ref="a1f3e245dad98042900c0348103c00a71" args="(Uint16 w, Uint16 h)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_dimensions </td>
          <td>(</td>
          <td class="paramtype">Uint16&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Uint16&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the width and height of the <a class="el" href="class_box.html">Box</a>. </p>

</div>
</div>
<a class="anchor" id="af7a137e6afa3dde822017522ac635494"></a><!-- doxytag: member="Box::set_h" ref="af7a137e6afa3dde822017522ac635494" args="(Uint16 h)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_h </td>
          <td>(</td>
          <td class="paramtype">Uint16&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the height of the <a class="el" href="class_box.html">Box</a>. </p>

</div>
</div>
<a class="anchor" id="a5d807c5d4f1cace5416b30be4c3c97f2"></a><!-- doxytag: member="Box::set_mode" ref="a5d807c5d4f1cace5416b30be4c3c97f2" args="(int mode, bool val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_mode </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a mode of the <a class="el" href="class_box.html">Box</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>An integer that represents the mode to be set </td></tr>
    <tr><td class="paramname">val</td><td>Boolean state of the mode </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_box.html#a93f300a67e2c7532497987c4ee68d829" title="Gets the state of a mode of the Box.">get_mode()</a>, <a class="el" href="bennysc_8h.html">bennysc.h</a> </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_box_a5d807c5d4f1cace5416b30be4c3c97f2_icgraph.png" border="0" usemap="#class_box_a5d807c5d4f1cace5416b30be4c3c97f2_icgraph" alt=""/></div>
<map name="class_box_a5d807c5d4f1cace5416b30be4c3c97f2_icgraph" id="class_box_a5d807c5d4f1cace5416b30be4c3c97f2_icgraph">
<area shape="rect" id="node3" href="class_particle.html#a40f4c7e248029d72e7714b7802d5e5e1" title="Particle::Particle" alt="" coords="166,5,285,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a6702cb074e92ec70bc029fb2ff6d62f7"></a><!-- doxytag: member="Box::set_pos" ref="a6702cb074e92ec70bc029fb2ff6d62f7" args="(Sint16 x, Sint16 y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_pos </td>
          <td>(</td>
          <td class="paramtype">Sint16&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Sint16&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the x and y positions of the <a class="el" href="class_box.html">Box</a>. </p>

</div>
</div>
<a class="anchor" id="a37ffc759ea75c89c6fe2ac3d1d897a2e"></a><!-- doxytag: member="Box::set_sprite" ref="a37ffc759ea75c89c6fe2ac3d1d897a2e" args="(SDL_Surface *newSprite)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Box::set_sprite </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>newSprite</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets a sprite to be used. </p>
<p>It's usually recommended that you use Box's "free sprite on destruction" mode if this sprite is going to be shared. Not using this mode may result in serious errors if this <a class="el" href="class_box.html">Box</a> is destroyed before other objects using the sprite </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newSprite</td><td>Pointer to the SDL_Surface to be used </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9c17a4d538d2ff7ab67f516d607fc3dd"></a><!-- doxytag: member="Box::set_w" ref="a9c17a4d538d2ff7ab67f516d607fc3dd" args="(Uint16 w)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_w </td>
          <td>(</td>
          <td class="paramtype">Uint16&#160;</td>
          <td class="paramname"><em>w</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the width of the <a class="el" href="class_box.html">Box</a>. </p>

</div>
</div>
<a class="anchor" id="aa88ca140376a67872f2f7c1a1c39eb6b"></a><!-- doxytag: member="Box::set_x" ref="aa88ca140376a67872f2f7c1a1c39eb6b" args="(Sint16 x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_x </td>
          <td>(</td>
          <td class="paramtype">Sint16&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the x position of the <a class="el" href="class_box.html">Box</a>. </p>

</div>
</div>
<a class="anchor" id="a99ffef8e5f7a78611f5650f005594da0"></a><!-- doxytag: member="Box::set_y" ref="a99ffef8e5f7a78611f5650f005594da0" args="(Sint16 y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Box::set_y </td>
          <td>(</td>
          <td class="paramtype">Sint16&#160;</td>
          <td class="paramname"><em>y</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the y position of the <a class="el" href="class_box.html">Box</a>. </p>

</div>
</div>
<a class="anchor" id="aef168d8226c16322d2778fdf756057bb"></a><!-- doxytag: member="Box::tick" ref="aef168d8226c16322d2778fdf756057bb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Box::tick </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Empty tick funtion. </p>
<p>Tick function that immediately returns. Allows static, boring boxes like this class to be thrown through the same algorithms as derived classes (players, particles, etc.) without causing issues. Rather useless but there for flexibility. </p>

<p>Reimplemented in <a class="el" href="class_particle.html#a7ca72f987d80c7b93db355798a3d9599">Particle</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a75ec7af4bf4a011c3636c05e98abb154"></a><!-- doxytag: member="Box::boxColour" ref="a75ec7af4bf4a011c3636c05e98abb154" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Colour <a class="el" href="class_box.html#a75ec7af4bf4a011c3636c05e98abb154">Box::boxColour</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a2ea13ce4c2a4d9045bdd07b70a2d3b4e"></a><!-- doxytag: member="Box::boxRect" ref="a2ea13ce4c2a4d9045bdd07b70a2d3b4e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Rect <a class="el" href="class_box.html#a2ea13ce4c2a4d9045bdd07b70a2d3b4e">Box::boxRect</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae8a7fb4f1f59a7e8b2baaa66811b1a15"></a><!-- doxytag: member="Box::clipRect" ref="ae8a7fb4f1f59a7e8b2baaa66811b1a15" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Rect <a class="el" href="class_box.html#ae8a7fb4f1f59a7e8b2baaa66811b1a15">Box::clipRect</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a3adda3311d61e9a36e6c2ff412e03a82"></a><!-- doxytag: member="Box::sprite" ref="a3adda3311d61e9a36e6c2ff412e03a82" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* <a class="el" href="class_box.html#a3adda3311d61e9a36e6c2ff412e03a82">Box::sprite</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented in <a class="el" href="class_particle.html#a08e471cb7a6096a1b2e5517f9b53e418">Particle</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="_box_8h_source.html">Box.h</a></li>
<li>src/<a class="el" href="_box_8cpp.html">Box.cpp</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_box.html">Box</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Oct 23 2011 04:30:01 for benny-sdl-classes by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
